using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._SpatialAnalystTools._Multivariate
{
    /// <summary>
    /// <para>Iso Cluster</para>
    /// <para>Uses an isodata clustering algorithm to determine the characteristics of the natural groupings of cells in multidimensional attribute space and stores the results in an output ASCII signature file.</para>
    /// <para>使用等值数据聚类算法确定多维属性空间中细胞自然分组的特征，并将结果存储在输出 ASCII 特征文件中。</para>
    /// </summary>    
    [DisplayName("Iso Cluster")]
    public class IsoCluster : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public IsoCluster()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_raster_bands">
        /// <para>Input raster bands</para>
        /// <para><xdoc>
        ///   <para>The input raster bands.</para>
        ///   <para>They can be integer or floating point type.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输入栅格波段。</para>
        ///   <para>它们可以是整数类型或浮点类型。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_out_signature_file">
        /// <para>Output signature file</para>
        /// <para><xdoc>
        ///   <para>The output signature file.</para>
        ///   <para>A .gsg extension must be specified.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出签名文件。</para>
        ///   <para>必须指定 .gsg 扩展名。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_number_classes">
        /// <para>Number of classes</para>
        /// <para>Number of classes into which to group the cells.</para>
        /// <para>要将单元格分组到的类数。</para>
        /// </param>
        public IsoCluster(List<object> _in_raster_bands, object _out_signature_file, long? _number_classes)
        {
            this._in_raster_bands = _in_raster_bands;
            this._out_signature_file = _out_signature_file;
            this._number_classes = _number_classes;
        }
        public override string ToolboxName => "Spatial Analyst Tools";

        public override string ToolName => "Iso Cluster";

        public override string CallName => "sa.IsoCluster";

        public override List<string> AcceptEnvironments => ["cellSize", "cellSizeProjectionMethod", "extent", "geographicTransformations", "mask", "outputCoordinateSystem", "scratchWorkspace", "snapRaster", "workspace"];

        public override object[] ParameterInfo => [_in_raster_bands, _out_signature_file, _number_classes, _number_iterations, _min_class_size, _sample_interval];

        /// <summary>
        /// <para>Input raster bands</para>
        /// <para><xdoc>
        ///   <para>The input raster bands.</para>
        ///   <para>They can be integer or floating point type.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输入栅格波段。</para>
        ///   <para>它们可以是整数类型或浮点类型。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input raster bands")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _in_raster_bands { get; set; }


        /// <summary>
        /// <para>Output signature file</para>
        /// <para><xdoc>
        ///   <para>The output signature file.</para>
        ///   <para>A .gsg extension must be specified.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出签名文件。</para>
        ///   <para>必须指定 .gsg 扩展名。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output signature file")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_signature_file { get; set; }


        /// <summary>
        /// <para>Number of classes</para>
        /// <para>Number of classes into which to group the cells.</para>
        /// <para>要将单元格分组到的类数。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Number of classes")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public long? _number_classes { get; set; }


        /// <summary>
        /// <para>Number of iterations</para>
        /// <para><xdoc>
        ///   <para>Number of iterations of the clustering process to run.</para>
        ///   <para>The default is 20.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要运行的聚类分析进程的迭代次数。</para>
        ///   <para>默认值为 20。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Number of iterations")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long _number_iterations { get; set; } = 20;


        /// <summary>
        /// <para>Minimum class size</para>
        /// <para><xdoc>
        ///   <para>Minimum number of cells in a valid class.</para>
        ///   <para>The default is 20.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>有效类中的最小单元格数。</para>
        ///   <para>默认值为 20。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Minimum class size")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long _min_class_size { get; set; } = 20;


        /// <summary>
        /// <para>Sample interval</para>
        /// <para><xdoc>
        ///   <para>The interval to be used for sampling.</para>
        ///   <para>The default is 10.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>用于采样的时间间隔。</para>
        ///   <para>默认值为 10。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Sample interval")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long _sample_interval { get; set; } = 10;


        public IsoCluster SetEnv(object cellSize = null, object extent = null, object geographicTransformations = null, object mask = null, object outputCoordinateSystem = null, object scratchWorkspace = null, object snapRaster = null, object workspace = null)
        {
            base.SetEnv(cellSize: cellSize, extent: extent, geographicTransformations: geographicTransformations, mask: mask, outputCoordinateSystem: outputCoordinateSystem, scratchWorkspace: scratchWorkspace, snapRaster: snapRaster, workspace: workspace);
            return this;
        }

    }

}